<include file="headerUser"/>
<div class="admin">
<!-- 菜单开始-->
<include file="userMenu"/>
<!-- 菜单结束-->
<div id="am_xian" class="am_xian">
    <script type="text/javascript">
        $(function() {
            //移除在模板页的样式，其他继承模板页的都要，只有此页不要这样式
            $("#am_xian").removeClass("am_xian");

            var liobj = $(".am_center>.am_qie li");
            liobj.find("a").click(function() {
                //对样式进行改变
                liobj.removeClass("am_powon");
                var li = $(this).parent();
                li.addClass("am_powon");
                //动态和panli情报切换
                var listyle = li.attr("typeli");
                if (listyle == "dongtai") {
                    $(".am_center .am_xinxi").show();
                    $(".am_center .am_qb1").hide();
                } else if (listyle == "qingbao") {
                    $(".am_center .am_qb1").show();
                    $(".am_center .am_xinxi").hide();
                }
            });


        });
    </script>

    <div class="am_center">
        <div class="am_data">
            <div class="am_geren">
                <div class="am_photo">
                    <a href="/mypanli/EditUserInfo.aspx">
                        <img src="__HOMEIMG__/noimg120.gif" />
                    </a>
                </div>
                
                <div class="am_info">
                    <h2>{$user->getUserName()}</h2>
                    <div class="am_zh">
                    	<table>
                        	<tr>
                            	<td>EMAIL：<span>{$user->getUserEmail()}</span></td>
                            </tr>
							<tr>
                            	<td>NAME:<span>{$user->getUserName()} </span></td>
                            </tr>
                        	<tr>
                            	<td >Address：<span>{$user->getUserAddress()}</span></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            
            
            <div class="am_shuju">
                <ul>
                    <li pagedata="TotalOrders">
                        <a href="/mypanli/OrderCart.aspx">我的订单<span></span></a>
                    </li>
                    <li pagedata="UndoOrders">
                        <a href="/mypanli/OrderCart.aspx">未处理订单<span></span></a>
                    </li>
                    <li pagedata="FinishedOrders">
                        <a href="/mypanli/OrderList.aspx">已发货订单<span></span></a>
                    </li>
                    <li pagedata="UnreadMsg">
						<a href="/mypanli/MessageBox/SystemMessage.aspx">未读短信<span></span></a>
					</li>
                </ul>
                <div style="clear:both"></div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(function() {
            $.ajax({
                type: "POST",
                url: "__URL__/getMyMessCount/",
                timeout: 10000,
                success: function(re) {
                    var data = re.info;
                    $("li[pagedata]").each(function(i, item) {
                        var thiscount = parseInt(data[$(this).attr("pagedata")]);
                        if (thiscount == 0) {
                            $(this).addClass("am_not");
                        }
                        $(this).find("span").html("(" + thiscount + ")");
                    });
                }
            });
        });
    </script>
</div>
</div>

<include file="footer"/>